package com.tess.tboot.serviceimpl;


import com.tess.tboot.base.TbootServiceImpl;
import com.tess.tboot.dao.mapper.UserRoleMapper;
import com.tess.tboot.entity.Role;
import com.tess.tboot.entity.UserRole;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 用户角色接口实现
 *
 * @author Exrickx
 */
@Slf4j
@Service
@Transactional
public class UserRoleServiceImpl extends TbootServiceImpl<UserRoleMapper, UserRole> {

    @Autowired
    private UserRoleMapper userRoleMapper;

    public List<UserRole> findByRoleId(String roleId) {
        return userRoleMapper.findByRoleId(roleId);
    }

    public void deleteByUserId(String userId) {
        userRoleMapper.deleteByUserId(userId);
    }

    public List<Role> findByUserId(String userId) {
        return null;
    }
}
